package com.poly.system.pojo.dto;

import com.poly.common.core.validate.Add;
import com.poly.common.core.web.domain.BaseDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * 应用菜单授权对象 sys_app_menu_auth
 *
 * @author poly
 * @date 2024-01-02
 */
@ApiModel(value = "SysAppMenuAuthDTO", description = "应用菜单授权")
@Data
public class SysAppMenuAuthDTO extends BaseDTO
{
    private static final long serialVersionUID = 1L;

    /**
     * 菜单编号列表
     */
    @ApiModelProperty(value = "菜单编号列表")
    @NotNull(message = "菜单编号不能为空", groups = {Add.class})
    @Size(min = 1, message = "菜单编号不能为空", groups = {Add.class})
    private List<Long> menuIdList;

    /**
     * 授权类型（1机构，2角色，3用户
     */
    @ApiModelProperty(value = "授权类型（1机构，2角色，3用户")
    @NotNull(message = "授权类型不能为空", groups = {Add.class})
    private Integer authType;

    /**
     * 授权编号
     */
    @ApiModelProperty(value = "授权编号")
    @NotNull(message = "授权编号不能为空", groups = {Add.class})
    private Long authId;
}
